<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')

			uni.addInterceptor('request', {
				invoke(args) {
					// request 触发前拼接 url 
					args.url = 'http://localhost:3000' + args.url
				},
				success(args) {
					// 请求成功后，修改code值为1
					args.data.code = 200
				},
				fail(err) {
					console.log('interceptor-fail', err)
				},
				complete(res) {
					// console.log('interceptor-complete', res)
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {
			gTodoLIst: [{
				label: '第一家市',
				value: 1
			}, {
				label: '第er家市',
				value: 2
			}]
		},
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	.pageBox {
		width: 100vw;
		min-height: 100vh;
		background-color: $uni-bg-color-grey;
		font-size: 40rpx;
		line-height: 1.4em;
		// background-color: #ff9999 !important;
	}
</style>
